package com.ruoyi.commodity.domain;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 订单对象 commodity_order
 *
 * @author ruoyi
 * @date 2024-01-14
 */
@TableName("commodity_order")
public class CommodityOrder implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String oid;

    /** 用户id */
    @Excel(name = "用户id")
    private String appuserId;

    /** 总金额 */
    @Excel(name = "总金额")
    private BigDecimal totalPrice;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal paidPrice;

    /** 单价 */
    @Excel(name = "单价")
    private BigDecimal singlePrice;

    /** 数量 */
    @Excel(name = "数量")
    private Integer count;

    /** 总积分 */
    @Excel(name = "总积分")
    private BigDecimal totalIntegral;

    /** 支付模式1微信 */
    @Excel(name = "支付模式1微信")
    private Integer payMode;

    /** 订单状态0待付款(未支付)1待发货(已支付)2已发货3已退款4已到货5已取消6已完成 */
    @Excel(name = "订单状态0待付款(未支付)1待发货(已支付)2已发货3已退款4已到货5已取消6已完成7退款中")
    private Integer status;

    /** 快递单号 */
    @Excel(name = "快递单号")
    private String waybill;

    /** 快递 */
    @Excel(name = "快递")
    private String express;

    /** 发货时间 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setOid(String oid)
    {
        this.oid = oid;
    }

    public String getOid()
    {
        return oid;
    }
    public void setAppuserId(String appuserId)
    {
        this.appuserId = appuserId;
    }

    public String getAppuserId()
    {
        return appuserId;
    }
    public void setTotalPrice(BigDecimal totalPrice)
    {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getTotalPrice()
    {
        return totalPrice;
    }
    public void setPaidPrice(BigDecimal paidPrice)
    {
        this.paidPrice = paidPrice;
    }

    public BigDecimal getPaidPrice()
    {
        return paidPrice;
    }
    public void setSinglePrice(BigDecimal singlePrice)
    {
        this.singlePrice = singlePrice;
    }

    public BigDecimal getSinglePrice()
    {
        return singlePrice;
    }
    public void setCount(Integer count)
    {
        this.count = count;
    }

    public Integer getCount()
    {
        return count;
    }
    public void setTotalIntegral(BigDecimal totalIntegral)
    {
        this.totalIntegral = totalIntegral;
    }

    public BigDecimal getTotalIntegral()
    {
        return totalIntegral;
    }
    public void setPayMode(Integer payMode)
    {
        this.payMode = payMode;
    }

    public Integer getPayMode()
    {
        return payMode;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setWaybill(String waybill)
    {
        this.waybill = waybill;
    }

    public String getWaybill()
    {
        return waybill;
    }
    public void setExpress(String express)
    {
        this.express = express;
    }

    public String getExpress()
    {
        return express;
    }
    public void setDeliveryTime(Date deliveryTime)
    {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime()
    {
        return deliveryTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("oid", getOid())
            .append("appuserId", getAppuserId())
            .append("createTime", getCreateTime())
            .append("totalPrice", getTotalPrice())
            .append("paidPrice", getPaidPrice())
            .append("singlePrice", getSinglePrice())
            .append("count", getCount())
            .append("totalIntegral", getTotalIntegral())
            .append("payMode", getPayMode())
            .append("status", getStatus())
            .append("waybill", getWaybill())
            .append("express", getExpress())
            .append("deliveryTime", getDeliveryTime())
            .toString();
    }
}
